#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_Up_clicked()
{
    QRect r=ui->pushButton_thing->geometry();
    //r.setY(r.y()-5);
    ui->pushButton_thing->move(r.x(),r.y()-5);
    //ui->pushButton_thing->setGeometry(r.x(),r.y()-5,r.width(),r.height());
}

void Widget::on_pushButton_Right_clicked()
{
    QRect r=ui->pushButton_thing->geometry();
    //r.setX(r.x()+5);
    ui->pushButton_thing->setGeometry(r.x()+5,r.y(),r.width(),r.height());
}

void Widget::on_pushButton_Left_clicked()
{
    QRect r=ui->pushButton_thing->geometry();
    //r.setX(r.x()-5);
   ui->pushButton_thing->setGeometry(r.x()-5,r.y(),r.width(),r.height());
}

void Widget::on_pushButton_Down_clicked()
{
    QRect r=ui->pushButton_thing->geometry();
    //r.setY(r.y()+5);
   ui->pushButton_thing->setGeometry(r.x(),r.y()+5,r.width(),r.height());
}
